package com.wenhai.spring.dependency.container;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

public class IoCContainer {
    public static void main(String[] args) {
        DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanFactory);
        String location = "META-INF/dependency-injection-context.xml";
        int beanCount = reader.loadBeanDefinitions(location);
        System.out.println("Bean 定义加载的数量：" + beanCount);

    }
}
